// 相关
// noinspection JSUnusedLocalSymbols

import {MyCache} from "@ginstone/common-utils/dist/src/utils/MyCache";
import {NukeApi} from "@ginstone/nga-api/dist/src/method/NukeApi";

export default {
    namespaced: true,
    state: {
        cache: new MyCache(),

    },
    mutations: {
        method(state, payload) {

        },
    },
    actions: {
        method: ({dispatch, commit, state, rootGetters}, payload) => {

        },
        blockSubForumList: ({dispatch, commit, state, rootGetters}, {force, forumId}) => {
            const client = rootGetters["Account/getClient"]();
            const method = () => NukeApi.blockSubForumList(client, forumId)
            return state.cache.use({userId: client.userId, forumId}, method, force)
        },
        blockSubForumAdd: ({dispatch, commit, state, rootGetters}, {fid, id}) => {
            const client = rootGetters["Account/getClient"]();
            return NukeApi.blockSubForumAdd(client, fid, id)
        },
        blockSubForumDel: ({dispatch, commit, state, rootGetters}, {fid, id}) => {
            const client = rootGetters["Account/getClient"]();
            return NukeApi.blockSubForumDel(client, fid, id)
        },

    },
    getters: {},
}